package com.ruoyi.system.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TaskRewardSetMapper;
import com.ruoyi.system.domain.TaskRewardSet;
import com.ruoyi.system.service.ITaskRewardSetService;

/**
 * 任务奖励配置Service业务层处理
 * 
 * @author DEREK
 * @date 2023-05-23
 */
@Service
public class TaskRewardSetServiceImpl extends ServiceImpl<TaskRewardSetMapper, TaskRewardSet> implements ITaskRewardSetService 
{
    @Autowired
    private TaskRewardSetMapper taskRewardSetMapper;

    /**
     * 查询任务奖励配置
     * 
     * @param id 任务奖励配置主键
     * @return 任务奖励配置
     */
    @Override
    public TaskRewardSet selectTaskRewardSetById(Long id)
    {
        return taskRewardSetMapper.selectTaskRewardSetById(id);
    }

    /**
     * 查询任务奖励配置列表
     * 
     * @param taskRewardSet 任务奖励配置
     * @return 任务奖励配置
     */
    @Override
    public List<TaskRewardSet> selectTaskRewardSetList(TaskRewardSet taskRewardSet)
    {
        return taskRewardSetMapper.selectTaskRewardSetList(taskRewardSet);
    }

    /**
     * 新增任务奖励配置
     * 
     * @param taskRewardSet 任务奖励配置
     * @return 结果
     */
    @Override
    public int insertTaskRewardSet(TaskRewardSet taskRewardSet)
    {
        taskRewardSet.setCreateTime(DateUtils.getNowDate());
        return taskRewardSetMapper.insertTaskRewardSet(taskRewardSet);
    }

    /**
     * 修改任务奖励配置
     * 
     * @param taskRewardSet 任务奖励配置
     * @return 结果
     */
    @Override
    public int updateTaskRewardSet(TaskRewardSet taskRewardSet)
    {
        return taskRewardSetMapper.updateTaskRewardSet(taskRewardSet);
    }

    /**
     * 批量删除任务奖励配置
     * 
     * @param ids 需要删除的任务奖励配置主键
     * @return 结果
     */
    @Override
    public int deleteTaskRewardSetByIds(Long[] ids)
    {
        return taskRewardSetMapper.deleteTaskRewardSetByIds(ids);
    }

    /**
     * 删除任务奖励配置信息
     * 
     * @param id 任务奖励配置主键
     * @return 结果
     */
    @Override
    public int deleteTaskRewardSetById(Long id)
    {
        return taskRewardSetMapper.deleteTaskRewardSetById(id);
    }
}
